package com.ruiyian.bridge.project.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruiyian.common.annotation.Excel;
import com.ruiyian.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 测点信息
 *
 * @author ruoyi
 * @date 2022-01-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("t_sensor_info")
public class MeasurePoint
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** id-桥梁名称 */
    @Excel(name = "id-桥梁名称")
    private Long bridgeId;

    /** 设备id */
    @Excel(name = "设备id")
    private String sbid;

    /** 设备地址 */
    @Excel(name = "设备地址")
    private String addr;

    /** 设备MAC地址 */
    @Excel(name = "设备MAC地址")
    private String macaddr;

    /** 测点编号 */
    @Excel(name = "测点编号")
    private String sensorNo;

    /** 测点名称 */
    @Excel(name = "测点名称")
    private String sensorName;

    /** 测点类型（1：静力沉降，2：激光测距，3：倾角） */
    @Excel(name = "测点类型", readConverterExp = "1=：静力沉降，2：激光测距，3：倾角")
    private Integer sensorType;

    /** 安装位置信息 */
    @Excel(name = "安装位置信息")
    private String sensorAddress;

    /** 基准时刻 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "基准时刻", width = 30, dateFormat = "yyyy-MM-dd")
    private Date baseTime;

    /** 初始值 */
    @Excel(name = "初始值")
    private Long baseVlue;

    /** 桥梁名称 */
    @Excel(name = "桥梁名称")
    private String bridgeName;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long orderBy;

    /** 桥墩 */
    @Excel(name = "桥墩")
    private String bridgePier;

    /**最新值*/
    @TableField(exist = false)
    private String distance;
    /**最新时间*/
    @TableField(exist = false)
    private Date distanceTime;

    private Date createTime;

    private Date updateTime;
    /**测点类型*/
    @TableField(exist = false)
    private String type;
    /**测点状态*/
    @TableField(exist = false)
    private String status;
    /**状态显示*/
    @TableField(exist = false)
    private String statusName;
    /**状态显示*/
    @TableField(exist = false)
    private String yellowStatus;

    /**
     * 设备类型名称
     */
    @TableField(exist = false)
    private String typeName;
    @TableField(exist = false)
    private String icon;



}
